package com.tianlh.service.serializable;

import com.tianlh.entity.Book;

/**
 * @author wb-tianlihui
 * @date 2017/12/20
 */
public class SerializableTest {
    public static void main(String[] args) {
        Book book = new Book();
        book.setNumber(10);
        book.setName("JVM深度解析");
        book.setBookId(1111L);
        SerializationUtils.writeObject(book);
        Book book1 = (Book)SerializationUtils.readObject();
        System.out.println(book1.toString());
    }
}
